package com.liuya.db;

public class ResultSetReaderUtil implements java.io.Serializable {
	public static ResultSetReader getReader(String fieldClassName) {
		if (fieldClassName.equals("float") || fieldClassName.equals("java.lang.Float"))
			return new ResultSetReader.FloatReader();
		else if (fieldClassName.equals("double") || fieldClassName.equals("java.lang.Double"))
			return new ResultSetReader.DoubleReader();
		else if (fieldClassName.equals("int") || fieldClassName.equals("java.lang.Integer"))
			return new ResultSetReader.IntegerReader();
		else if (fieldClassName.equals("long") || fieldClassName.equals("java.lang.Long"))
			return new ResultSetReader.LongReader();
		else if (fieldClassName.equals("boolean") || fieldClassName.equals("java.lang.Boolean"))
			return new ResultSetReader.BooleanReader();
		else if (fieldClassName.equals("short") || fieldClassName.equals("java.lang.Short"))
			return new ResultSetReader.ShortReader();
		else if (fieldClassName.equals("java.util.Date"))
			return new ResultSetReader.JavaUtilDateReader();
		else
			return new ResultSetReader.ObjectReader();
	}
}
